#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
import abc
class File(metaclass=abc.ABCMeta):
    @abc.abstractmethod
    def read(self):
        pass

class Txt(File):
    def read(self):
        pass

class Sql(File):
    pass

# f = File()  # TypeError: Can't instantiate abstract class File with abstract methods read
t1 = Txt()   # 但Txt这个类没有与File基类达到统一时会报错TypeError: Can't instantiate abstract class Txt with abstract methods read
# s1 = Sql()
#
# t1.read()
# s1.read()